home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / d.t.p / utils / propage / donsgenies / donsgenies.lha / Don'sGenies / BoxIdentify.pprx < prev    next >
Text File  |  1993-05-25  |  890b  |  40 lines

  1. /* Get name and number of box. The user data will only be present if it has been put in the box by a genie.
  2. Written by Don Cox  Not Public Domain. All rights reserved. */
  3.  
  4. trace n
  5. signal on error
  6. signal on syntax
  7.  
  8. address command
  9. call SafeEndEdit.rexx()
  10. address command
  11. call SafeEndEdit.rexx()    
  12.  
  13. box=ppm_ClickOnBox("Click on box to be identified")
  14. if box=0 then exit_msg("No box selected")
  15. boxname = ppm_GetBoxName(box)
  16. if boxname = "" then boxname = "(Not named)"
  17. thisbox = ppm_BoxNum(box)
  18. udata = ppm_GetBoxUserData(box)
  19. if udata = "" then udata = "None"
  20.  
  21. call exit_msg("Name: "boxname"   Number: "box"  User Data: "udata))
  22.  
  23. end
  24.  
  25. error:
  26. syntax:
  27.     do
  28.     exit_msg("Genie failed due to error: "errortext(rc))
  29.     end
  30.  
  31. exit_msg:
  32.     do
  33.     parse arg message
  34.     if message ~= "" then
  35.     call ppm_Inform(1,message)
  36.     call ppm_ClearStatus()
  37.     call ppm_AutoUpdate(1)
  38.     exit
  39.     end
  40.